home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / ps40sdk / examples / format / simpleformat / common / simpleformat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-22  |  2.1 KB  |  91 lines

  1. /*
  2.     File: SimpleFormat.h
  3.  
  4.     Copyright (c) 1994-6, Adobe Systems Incorporated.
  5.     All rights reserved.
  6.  
  7.     Utilities for format module.
  8. */
  9.  
  10. #ifndef __SimpleFormat_H__
  11. #define __SimpleFormat_H__
  12.  
  13. #include "PITypes.h"
  14. #include "PIGeneral.h"
  15. #include "PIFormat.h"
  16. #include "PIUtilities.h"
  17. #include "PIActions.h"
  18.  
  19. /*****************************************************************************/
  20. /* constants */
  21.  
  22. #define keyFoo        'fooB'
  23. #define keyBar        'barF'
  24.  
  25. /*****************************************************************************/
  26. /* scripting parameters */
  27.  
  28. /*****************************************************************************/
  29.  
  30. extern Handle hDllInstance;
  31.  
  32. typedef struct GlobalData
  33.     {
  34.  
  35.     FormatRecordPtr    formatParamBlock;
  36.     short            result;
  37.     
  38.     BufferID        pixelBuffer;
  39.     Ptr                pixelData;
  40.     
  41.     int32            rowBytes;
  42.     
  43.     } Globals, *GPtr, **GHdl;
  44.     
  45. /*****************************************************************************/
  46.  
  47. typedef struct FileHeader
  48.     {
  49.     
  50.     char identifier [8];
  51.     
  52.     int16 mode;
  53.     int16 depth;
  54.     int16 rows;
  55.     int16 cols;
  56.     int16 planes;
  57.     
  58.     int32 resourceLength;
  59.     
  60.     } FileHeader;
  61.  
  62. /*****************************************************************************/
  63.  
  64. #define gStuff       (globals->formatParamBlock)
  65. #define gResult      (globals->result)
  66. #define gPixelBuffer (globals->pixelBuffer)
  67. #define gPixelData   (globals->pixelData)
  68. #define gRowBytes    (globals->rowBytes)
  69.  
  70. /*****************************************************************************/
  71.  
  72. void DoAbout (GPtr globals);
  73. Boolean ReadScriptParamsOnRead (GPtr globals);
  74. OSErr WriteScriptParamsOnRead (GPtr globals);
  75. Boolean ReadScriptParamsOnWrite (GPtr globals);
  76. OSErr WriteScriptParamsOnWrite (GPtr globals);
  77.  
  78. /*****************************************************************************/
  79.  
  80. #if MSWindows
  81. // prototypes of some Mac toolbox routines used in Export.c
  82. // Implemented in SimUiWin.c
  83. OSErr FSWrite(int32 refNum,long *count,void *buffPtr); 
  84. OSErr FSRead(int32 refNum,long *count,void *buffPtr); 
  85. OSErr SetFPos(int32 refNum, short posMode, long posOff);
  86. #define fsFromStart    0
  87. #endif /* MSWindows */
  88.  
  89. /*****************************************************************************/
  90.  
  91. #endif /* __SimpleFormat_H__ */